package com.cx.service.czw.lmpl;

import com.cx.mapper.PageMapper;
import com.cx.service.czw.SelectPageInfoService;
import com.cx.vo.czw.UserDetailPageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SelectPageInfoServiceImpl implements SelectPageInfoService {

    @Autowired
    PageMapper pageMapper;

    //查询所有快递信息
    @Override
    public List<UserDetailPageInfo> selectAllPageInfo() {
        List<UserDetailPageInfo> userDetailPageInfoList = pageMapper.selectAllPageInfo();
        if(null != userDetailPageInfoList && userDetailPageInfoList.size()>0){
            return userDetailPageInfoList;
        }
        return null;
    }

    //查 通过pageNum
    @Override
    public List<UserDetailPageInfo> selectPageByPageNum(Integer pageNum) {
        List<UserDetailPageInfo> userDetailPageInfoList = pageMapper.selectPageByPageNum(pageNum);
        if(null != userDetailPageInfoList && userDetailPageInfoList.size()>0){
            return userDetailPageInfoList;
        }
        return null;
    }
    //查 通过 receivePhone
    @Override
    public List<UserDetailPageInfo> selectPageByReceivePhone(String receivePhone) {
        List<UserDetailPageInfo> userDetailPageInfoList = pageMapper.selectPageByReceivePhone(receivePhone);
        if(null != userDetailPageInfoList && userDetailPageInfoList.size()>0){
            return userDetailPageInfoList;
        }
        return null;
    }
    //查 通过 receiveName
    @Override
    public List<UserDetailPageInfo> selectPageByReceiveName(String receiveName) {
        List<UserDetailPageInfo> userDetailPageInfoList = pageMapper.selectPageByReceiveName(receiveName);
        if(null != userDetailPageInfoList && userDetailPageInfoList.size()>0){
            return userDetailPageInfoList;
        }
        return null;
    }
}
